<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#div1{
				height: 200px;
				width: 200px;
				background-color: aquamarine;
			}
			#div2{
				height: 200px;
				width: 200px;
				background-color: aqua;
			}
			#div3{
				height: 200px;
				width: 200px;
				background-color: blue;
			}
		</style>
	</head>
	<body>
		<h1 class="hh" id="aa">作业2</h1>
		<div id="div1" class="c1" name= 'd1'>
			<p>id</p>
			<p>类</p>
			<p>标签</p>
			<p>三种方式</p>
			<p>查找</p>
		</div>
		<div id="div2">
			<h1>有图片</h1>
			<img src="" >
		</div>
		<div id="div3">
			<ul>
				<li>1</li>
				<li>2</li>
				<li>3</li>
				<li>4</li>
				<li>5</li>
			</ul>
		</div>
		
		
	</body>
	<script type="text/javascript">
	// 分别实现 id,类，标签三种方式查找以上元素
		var div1 = document.getElementById('div1');
		var c1 = document.getElementsByClassName('c1');
		var d1 = document.getElementsByName('d1');
	    var p = document.getElementsByTagName('p');
		var h1 = document.getElementsByTagName('h1');
		var img = document.getElementsByTagName('img');
		var ul = document.getElementsByTagName('ul');
		var li = document.getElementsByTagName('li');
		console.log(d1)
		
	</script>
</html>
